package cn.relx.system.mapper;

import cn.relx.system.domain.Permission;
import cn.relx.system.domain.Role;
import cn.relx.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author relx
 * @since 2022-10-24
 */
public interface RoleMapper extends BaseMapper<Role> {

    void removeRoleMenu(Long id);

    void removeRolePermission(Long id);

    void addRoleMenu(@Param("rid") Long id,@Param("menus") List<Long> menus);

    void addRolepermission(@Param("rid") Long id,@Param("permission") List<Long> permission);

    Role findByRoleId(Long id);

    List<Permission> findRolesAndMenus();
}
